define(function(require){
	var main =require('/static/main.js');
	var m = new main();

	var Cont = {
        adType : 0,
		step:0,
		_init:function(){
            // 初始化左边菜单
            this.bindEvent();
		},
		bindEvent:function(){
            // 第一步选择模板类型
            var urltype = '';
            $('.panel-default').click(function(){
                var obj = $(this).find('.panel-default');
                var adtype = $(this).data("adtype");
                switch (adtype){
                    case 100:
                        window.location.href = "/promote/sales";
                        break;
                    case 200:
                        layer.confirm($(".layer-promote").html(), {
                            title:'选择模式',
                            btn: ['确定','取消'] //按钮
                        }, function(){
                            console.log(urltype);
                            switch (urltype){
                                case 100 : window.location.href = "/promote/reservation";break;
                                case 200 : window.location.href = "/promote/reservation1";break;
                                case 300 : window.location.href = "/promote/reservation2";break;
                                default : layer.msg('请选择预约模式');
                            }

                        }, function(){

                        });
                        //
                        break;
                    case 300:
                        window.location.href = "/promote/activity";
                        break;
                }
            });
            $(document).on("click", ".promote-btn", function(){
                urltype = $(this).data("type");
                $(this).css('border','1px solid #6e8cd7').siblings().css('border','1px solid #EEEEEE');

            });


		}


	}
    Cont._init();

})